import java.util.Random;

public class java010 {
    public static void main(String[] args){
        int arr[][]={{1,2,3},{4,5,6,7},{8,9,10}};
        int arr1[]={1,2,3,4,5,6,7,8,9,10};
        for(int i=0;i< arr1.length;i++){
            int random=new Random().nextInt(5);
            int temp=arr1[random];
            arr1[random]=arr1[i];
            arr1[i]=temp;
        }
        int a=0;
        for(int i=0;i<arr.length;i++){
            for (int j=0;j<arr[i].length;j++){
                arr[i][j]=arr1[a];
                a++;
            }
        }
        for(int i=0;i<arr.length;i++){
            for (int j=0;j<arr[i].length;j++){
               System.out.print(arr[i][j]);
            }
            System.out.println("");
        }
    }
}
